package com.tg.data.http.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public  class AllDriveRecord implements Parcelable {
    private int total;
    private List<DriveRecord> items;

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<DriveRecord> getItems() {
        return items;
    }

    public void setItems(List<DriveRecord> items) {
        this.items = items;
    }

    protected AllDriveRecord(Parcel in) {
        total = in.readInt();
        items = in.createTypedArrayList(DriveRecord.CREATOR);
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(total);
        dest.writeTypedList(items);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<AllDriveRecord> CREATOR = new Creator<AllDriveRecord>() {
        @Override
        public AllDriveRecord createFromParcel(Parcel in) {
            return new AllDriveRecord(in);
        }

        @Override
        public AllDriveRecord[] newArray(int size) {
            return new AllDriveRecord[size];
        }
    };
}
